<!DOCTYPE html>
<html>
<head>
	<title>二叉树_后序遍历</title>
</head>
<body>
<div>中序遍历</div>
<div>前序遍历</div>
<div>后序遍历</div>

<script type="text/javascript">
const treeRoot = {
	val: 'A',
	left: { 
		val: 'B',
		left: { 
			val: 'D',
			left: {
				val: 'G'
			}, 
			right: {
				val: 'H'
			} 
		},
	},
	right: {
		val: 'C',
		left: { val: 'E', left: null, right: {
			val: 'I'
		} },
		right: { val: 'F', left: null, right: null },
	},
};
</script>
<script type="text/javascript">
function DLR(root){
    if(root.left){
        DLR(root.left);
    }
    if(root.right){
        DLR(root.right);
    }
    console.log(root.val);
}
console.log('后序遍历:', DLR(treeRoot))
</script>
</body>
</html>